#pragma once

#include <d3d11.h>
#include <DirectXMath.h>

class TextureTargetRenderer
{
public:
	TextureTargetRenderer();
	~TextureTargetRenderer();

	void SetRenderTarget(ID3D11DeviceContext* deviceContext) const;
	void ClearRenderTarget(ID3D11DeviceContext* deviceContext) const;
	ID3D11ShaderResourceView*const* GetShaderResourceView() const;
	DirectX::XMMATRIX GetProjectionMatrix( void ) const;
	HRESULT InitializeD3D(ID3D11Device* device, int textureWith, int textureHeight);
	void ClearD3d(void);
private:
	ID3D11Texture2D* m_renderTargetTexture;
	ID3D11RenderTargetView* m_renderTargetView;
	ID3D11ShaderResourceView* m_shaderResourceView;
	ID3D11Texture2D* m_depthStencilBuffer;
	ID3D11DepthStencilView* m_depthStencilView;
	D3D11_VIEWPORT m_viewport;
};